package com.gin.supermarket_inventory_system.inventory.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.gin.database.base.BasePo;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Index;
import jakarta.persistence.Table;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.hibernate.annotations.Comment;

/**
 * 日结算
 * @since : 2023/10/13 16:40
 * @author : ginstone
 * @version : v1.0.0
 **/
@Getter
@Setter
@TableName(value = SettlementDayPo.TABLE_NAME, autoResultMap = true)
@Entity(name = SettlementDayPo.TABLE_NAME)
@NoArgsConstructor
@Table(indexes = {
        @Index(columnList = "date")
})
public class SettlementDayPo extends BasePo {
    protected static final String TABLE_NAME = "tb_inventory_entity_settlement_day";

    @Column(nullable = false, unique = true)
    @Comment("日期")
    String date;

    @Column(nullable = false)
    @Comment("销售收入总额")
    double totalPriceSell;

    @Column(nullable = false)
    @Comment("销售单数")
    int countSell;

    @Column(nullable = false)
    @Comment("销售退货总额")
    double totalPriceCancel;

    @Column(nullable = false)
    @Comment("销售退货单数")
    int countCancel;

    @Column(nullable = false)
    @Comment("进货总额")
    double totalPricePurchase;

    @Column(nullable = false)
    @Comment("进货单数")
    int countPurchase;

    @Column(nullable = false)
    @Comment("退货总额")
    double totalPriceReject;

    @Column(nullable = false)
    @Comment("退货单数")
    int countReject;
}